package cn.tedu.tongyi.controller;

import cn.tedu.tongyi.service.TongYiService;
import org.springframework.beans.factory.annotation.Autowired;
import org.springframework.web.bind.annotation.*;

@RestController
@RequestMapping("/ai")
@CrossOrigin
public class TongYiController {
    @Autowired
    private TongYiService tongYiSimpleService;
    @GetMapping("/simple")
    public String completion(
            @RequestParam(value = "message", defaultValue = "AI时代下Java开发者该何去何从？")
            String message
    ) {
        return tongYiSimpleService.completion(message);
    }
}
